package com.funny.learning.english.activity;

import java.util.ArrayList;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.funny.learning.english.GameBaseActivity;
import com.funny.learning.english.R;
import com.funny.learning.english.model.GameEntity;
import com.funny.learning.english.model.HistoryEntity;
import com.funny.learning.english.model.KhopTuEntity;

public class KhopTuActivity extends GameBaseActivity implements OnClickListener{
	
	private String TAG = "KhopTuActivity";
	
	private int SELECT_LEFT_1 = 1;
	private int SELECT_LEFT_2 = 2;
	private int SELECT_LEFT_3 = 3;
	private int SELECT_LEFT_4 = 4;
	private int SELECT_LEFT_5 = 5;
	private int SELECT_LEFT_6 = 6;
	private int SELECT_LEFT_7 = 7;
	private int SELECT_LEFT_8 = 8;
	private int SELECT_LEFT_9 = 9;
	private int SELECT_LEFT_10 = 10;
	
	private int SELECT_RIGHT_1 = 1;
	private int SELECT_RIGHT_2 = 2;
	private int SELECT_RIGHT_3 = 3;
	private int SELECT_RIGHT_4 = 4;
	private int SELECT_RIGHT_5 = 5;
	private int SELECT_RIGHT_6 = 6;
	private int SELECT_RIGHT_7 = 7;
	private int SELECT_RIGHT_8 = 8;
	private int SELECT_RIGHT_9 = 9;
	private int SELECT_RIGHT_10 = 10;
	
	private TextView tvLeft1;
	private TextView tvLeft2;
	private TextView tvLeft3;
	private TextView tvLeft4;
	private TextView tvLeft5;
	private TextView tvLeft6;
	private TextView tvRight1;
	private TextView tvRight2;
	private TextView tvRight3;
	private TextView tvRight4;
	private TextView tvRight5;
	private TextView tvRight6;
	private Animation animation1;
	private Animation animation2;
	private Animation animation3;
	private Animation animation4;
	private Animation animation5;
	private Animation animation6;
	private Animation animation9;
	private Animation animation7;
	private Animation animation8;
	private Animation animation11;
	private Animation animation10;
	private Animation animation12;
	private Animation animation13;
	private Animation animation14;
	private Animation animation15;
	private Animation animation16;
	private Animation animation17;
	private Animation animation18;
	private Animation animation19;
	private Animation animation20;
	
	private boolean isSelectLeft = false;
	private boolean isSelectRight = false;
	
	private String dataSelectLeft = "";
	private String dataSelectRight = "";
	
	private int selectLeft = 0;
	
	private int selectRight = 0;
	private ImageView ivHelp;
	
	private int countTrue;
	private TextView tvLeft7;
	private TextView tvLeft8;
	private TextView tvLeft9;
	private TextView tvLeft10;
	private TextView tvRight7;
	private TextView tvRight8;
	private TextView tvRight9;
	private TextView tvRight10; 
	
	private GameEntity gameEntity1 = null;
	private GameEntity gameEntity2 = null;
	private GameEntity gameEntity3 = null;
	private GameEntity gameEntity4 = null;
	private GameEntity gameEntity5 = null;
	private GameEntity gameEntity6 = null;
	private GameEntity gameEntity7 = null;
	private GameEntity gameEntity8 = null;
	private GameEntity gameEntity9 = null;
	private GameEntity gameEntity10 = null;
	
	private boolean isPause = false;
	
	private ArrayList<GameEntity> gameEntitiesLeft = new ArrayList<GameEntity>();
	private ArrayList<GameEntity> gameEntitiesRight = new ArrayList<GameEntity>();
	private ImageView ivPause;
	private ImageView ivPlay;
	private ImageView ivRefresh;
	private ImageView ivBack;
	private LinearLayout llPause;
	private TextView tvTitle;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) { 
		setContentView(R.layout.khop_tu_layout1);
		super.onCreate(savedInstanceState);
		
		ivPause = (ImageView)findViewById(R.id.ivPause);
		ivPlay = (ImageView)findViewById(R.id.ivPlay);
		ivRefresh = (ImageView)findViewById(R.id.ivRefresh);
		ivBack = (ImageView)findViewById(R.id.ivBack);
		llPause = (LinearLayout)findViewById(R.id.llPause);
		tvTitle = (TextView)findViewById(R.id.tvTitle);
		
		ivBack.setOnClickListener(this);
		ivPause.setOnClickListener(this);
		ivPlay.setOnClickListener(this);
		ivRefresh.setOnClickListener(this);
	}
	
	private void initUI(){
		ivHelp = (ImageView)findViewById(R.id.ivHelp);
		
		tvLeft1 = (TextView)findViewById(R.id.tvLeft1);
		tvLeft2 = (TextView)findViewById(R.id.tvLeft2);
		tvLeft3 = (TextView)findViewById(R.id.tvLeft3);
		tvLeft4 = (TextView)findViewById(R.id.tvLeft4);
		tvLeft5 = (TextView)findViewById(R.id.tvLeft5);
		tvLeft6 = (TextView)findViewById(R.id.tvLeft6);
		tvLeft7 = (TextView)findViewById(R.id.tvLeft7);
		tvLeft8 = (TextView)findViewById(R.id.tvLeft8);
		tvLeft9 = (TextView)findViewById(R.id.tvLeft9);
		tvLeft10 = (TextView)findViewById(R.id.tvLeft10);
		
		tvRight1 = (TextView)findViewById(R.id.tvRight1);
		tvRight2 = (TextView)findViewById(R.id.tvRight2);
		tvRight3 = (TextView)findViewById(R.id.tvRight3);
		tvRight4 = (TextView)findViewById(R.id.tvRight4);
		tvRight5 = (TextView)findViewById(R.id.tvRight5);
		tvRight6 = (TextView)findViewById(R.id.tvRight6);
		tvRight7 = (TextView)findViewById(R.id.tvRight7);
		tvRight8 = (TextView)findViewById(R.id.tvRight8);
		tvRight9 = (TextView)findViewById(R.id.tvRight9);
		tvRight10 = (TextView)findViewById(R.id.tvRight10);
		
		tvLeft1.setOnClickListener(this);
		tvLeft2.setOnClickListener(this);
		tvLeft3.setOnClickListener(this);
		tvLeft4.setOnClickListener(this);
		tvLeft5.setOnClickListener(this);
		tvLeft6.setOnClickListener(this);
		tvLeft7.setOnClickListener(this);
		tvLeft8.setOnClickListener(this);
		tvLeft9.setOnClickListener(this);
		tvLeft10.setOnClickListener(this);
		
		tvRight1.setOnClickListener(this);
		tvRight2.setOnClickListener(this);
		tvRight3.setOnClickListener(this);
		tvRight4.setOnClickListener(this);
		tvRight5.setOnClickListener(this);
		tvRight6.setOnClickListener(this);
		tvRight7.setOnClickListener(this);
		tvRight8.setOnClickListener(this);
		tvRight9.setOnClickListener(this);
		tvRight10.setOnClickListener(this);
		
		ivHelp.setOnClickListener(this);
	}
	
	private void addData(){
		
//		checkSizeData();
		
		if(mGameEntities.size() >= 1 && mGameEntities.size() < 2){
			gameEntity1 = mGameEntities.get(0);
		}else if(mGameEntities.size() >= 2 && mGameEntities.size() < 3){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
		}if(mGameEntities.size() >= 3 && mGameEntities.size() < 4){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
		}if(mGameEntities.size() >= 4 && mGameEntities.size() < 5){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
		}if(mGameEntities.size() >= 5 && mGameEntities.size() < 6){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			
		}if(mGameEntities.size() >= 6 && mGameEntities.size() < 7){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
		}if(mGameEntities.size() >= 7 && mGameEntities.size() < 8){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
		}if(mGameEntities.size() >= 8 && mGameEntities.size() < 9){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = mGameEntities.get(7);
		}if(mGameEntities.size() >= 9 && mGameEntities.size() < 10){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = mGameEntities.get(7);
			gameEntity9 = mGameEntities.get(8);
		}if(mGameEntities.size() >= 10 && mGameEntities.size() < 11){
			gameEntity1 = mGameEntities.get(0);
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = mGameEntities.get(7);
			gameEntity9 = mGameEntities.get(8);
			gameEntity9 = mGameEntities.get(9);
		}
		
		if(gameEntity1 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity1.getIid()), gameEntity1.getLname(), gameEntity1.getName());
			
			if(khopTuEntity1.getNameEng() == null|| khopTuEntity1.getNameViet() == null){
				tvLeft1.setVisibility(View.GONE);
				tvRight1.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			
			tvLeft1.setTag(khopTuEntity1.getId());
			tvLeft1.setText(khopTuEntity1.getNameEng());
			tvRight1.setTag(khopTuEntity1.getId());
			tvRight1.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft1.setVisibility(View.GONE);
			tvRight1.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity2 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity2.getIid()), gameEntity2.getLname(), gameEntity2.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null ){
				tvLeft2.setVisibility(View.GONE);
				tvRight2.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft2.setTag(khopTuEntity1.getId());
			tvLeft2.setText(khopTuEntity1.getNameEng());
			tvRight2.setTag(khopTuEntity1.getId());
			tvRight2.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft2.setVisibility(View.GONE);
			tvRight2.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity3 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity3.getIid()), gameEntity3.getLname(), gameEntity3.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null ){
				tvLeft3.setVisibility(View.GONE);
				tvRight3.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft3.setTag(khopTuEntity1.getId());
			tvLeft3.setText(khopTuEntity1.getNameEng());
			tvRight3.setTag(khopTuEntity1.getId());
			tvRight3.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft3.setVisibility(View.GONE);
			tvRight3.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity4 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity4.getIid()), gameEntity4.getLname(), gameEntity4.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft4.setVisibility(View.GONE);
				tvRight4.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft4.setTag(khopTuEntity1.getId());
			tvLeft4.setText(khopTuEntity1.getNameEng());
			tvRight4.setTag(khopTuEntity1.getId());
			tvRight4.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft4.setVisibility(View.GONE);
			tvRight4.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity5 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity5.getIid()), gameEntity5.getLname(), gameEntity5.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft5.setVisibility(View.GONE);
				tvRight5.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft5.setTag(khopTuEntity1.getId());
			tvLeft5.setText(khopTuEntity1.getNameEng());
			tvRight5.setTag(khopTuEntity1.getId());
			tvRight5.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft5.setVisibility(View.GONE);
			tvRight5.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity6 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity6.getIid()), gameEntity6.getLname(), gameEntity6.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null ){
				tvLeft6.setVisibility(View.GONE);
				tvRight6.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft6.setTag(khopTuEntity1.getId());
			tvLeft6.setText(khopTuEntity1.getNameEng());
			tvRight6.setTag(khopTuEntity1.getId());
			tvRight6.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft6.setVisibility(View.GONE);
			tvRight6.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity7 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity7.getIid()), gameEntity7.getLname(), gameEntity7.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft7.setVisibility(View.GONE);
				tvRight7.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft7.setTag(khopTuEntity1.getId());
			tvLeft7.setText(khopTuEntity1.getNameEng());
			tvRight7.setTag(khopTuEntity1.getId());
			tvRight7.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft7.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity8 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity8.getIid()), gameEntity8.getLname(), gameEntity8.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft8.setVisibility(View.GONE);
				tvRight8.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft8.setTag(khopTuEntity1.getId());
			tvLeft8.setText(khopTuEntity1.getNameEng());
			tvRight8.setTag(khopTuEntity1.getId());
			tvRight8.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft8.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity9 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity9.getIid()), gameEntity9.getLname(), gameEntity9.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft9.setVisibility(View.GONE);
				tvRight9.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft9.setTag(khopTuEntity1.getId());
			tvLeft9.setText(khopTuEntity1.getNameEng());
			tvRight9.setTag(khopTuEntity1.getId());
			tvRight9.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft9.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		if(gameEntity10 != null){
			KhopTuEntity khopTuEntity1 = new KhopTuEntity(String.valueOf(gameEntity10.getIid()), gameEntity10.getLname(), gameEntity10.getName());
			if(khopTuEntity1.getNameEng() == null || khopTuEntity1.getNameViet() == null){
				tvLeft10.setVisibility(View.GONE);
				tvRight10.setVisibility(View.GONE);
				countTrue = countTrue + 1;
			}
			tvLeft10.setTag(khopTuEntity1.getId());
			tvLeft10.setText(khopTuEntity1.getNameEng());
			tvRight10.setTag(khopTuEntity1.getId());
			tvRight10.setText(khopTuEntity1.getNameViet());
		}else{
			tvLeft10.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			countTrue = countTrue + 1;
		}
		animation1 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation2 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation3 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation4 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation5 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation6 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation9 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation7 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation8 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation11 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation10 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation12 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation13 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation14 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation15 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation16 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation17 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation18 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation19 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
		animation20 = AnimationUtils.loadAnimation(activity, R.anim.g_mw_wrong);
	}
	
	
	@Override
	protected void initSucess() {
		// TODO Auto-generated method stub
		super.initSucess();
		
		setTitle("Khớp từ");
		// data đã dc load hết
//		Toast.makeText(activity, "size " + mGameEntities.size(), 2000).show();
		
		initUI();
		addData();
	}

	@Override
	public void onClick(View arg0) {
		switch (arg0.getId()) {
		case R.id.ivPause:
			isPause = !isPause;
			if(isPause){
				ivPause.setImageResource(R.drawable.ic_play);
				llPause.setVisibility(View.VISIBLE);
			}else{
				ivPause.setImageResource(R.drawable.ic_pause);
				llPause.setVisibility(View.GONE);
			}
			break;
		case R.id.ivPlay:
			ivPause.setImageResource(R.drawable.ic_pause);
			llPause.setVisibility(View.GONE);
			break;
		case R.id.ivRefresh:
			ivPause.setImageResource(R.drawable.ic_pause);
			llPause.setVisibility(View.GONE);
			countTrue = 0;
//			gameEntity1 = null;
//			gameEntity2 = null;
//			gameEntity3 = null;
//			gameEntity4 = null;
//			gameEntity5 = null;
//			gameEntity6 = null;
//			gameEntity7 = null;
//			gameEntity8 = null;
//			gameEntity9 = null;
//			gameEntity10 = null;s
			addData();
			break;
		case R.id.ivBack:
			onBackPressed();
			break;
		case R.id.tvLeft1:
			if(selectLeft != SELECT_LEFT_1){
				
				dataSelectLeft = (String)tvLeft1.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_1, selectRight);
						
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_1, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_1;
					tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
				
//				dataSelectLeft = (String)tvLeft1.getTag();
//				selectLeft = SELECT_LEFT_1;
//				tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
			}else{
				selectLeft = 0;
				tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvLeft2:
			if(selectLeft != SELECT_LEFT_2){
//				dataSelectLeft = (String)tvLeft2.getTag();
//				selectLeft = SELECT_LEFT_2;
//				tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft2.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_2, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
//						Toast.makeText(activity, "Sai!!!", 1000).show();
						animIn_Correct(SELECT_LEFT_2, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_2;
					tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
				
			}else{
				selectLeft = 0;
				tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvLeft3:
			if(selectLeft != SELECT_LEFT_3){
				
				dataSelectLeft = (String)tvLeft3.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_3, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_3, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_3;
					tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
				
//				dataSelectLeft = (String)tvLeft3.getTag();
//				selectLeft = SELECT_LEFT_3;
//				tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
			}else{
				selectLeft = 0;
				tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvLeft4:
			if(selectLeft != SELECT_LEFT_4){
//				dataSelectLeft = (String)tvLeft4.getTag();
//				selectLeft = SELECT_LEFT_4;
//				tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft4.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_4, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_4, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_4;
					tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
				
			}else{
				selectLeft = 0;
				tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
			
		case R.id.tvLeft5:
			if(selectLeft != SELECT_LEFT_5){
//				dataSelectLeft = (String)tvLeft5.getTag();
//				selectLeft = SELECT_LEFT_5;
//				tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft5.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_5, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_5, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_5;
					tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
				
			}else{
				selectLeft = 0;
				tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvLeft7:
			if(selectLeft != SELECT_LEFT_7){
//				dataSelectLeft = (String)tvLeft6.getTag();
//				selectLeft = SELECT_LEFT_6;
//				tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft7.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_7, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_7, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_7;
					tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
			}else{
				selectLeft = 0;
				tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			
			break;
		case R.id.tvLeft8:
			if(selectLeft != SELECT_LEFT_8){
				dataSelectLeft = (String)tvLeft8.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_8, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_8, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_8;
					tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
			}else{
				selectLeft = 0;
				tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			
			break;
		case R.id.tvLeft9:
			if(selectLeft != SELECT_LEFT_9){
//				dataSelectLeft = (String)tvLeft6.getTag();
//				selectLeft = SELECT_LEFT_6;
//				tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft9.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_9, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_9, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_9;
					tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
			}else{
				selectLeft = 0;
				tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			
			break;
		case R.id.tvLeft10:
			if(selectLeft != SELECT_LEFT_10){
//				dataSelectLeft = (String)tvLeft6.getTag();
//				selectLeft = SELECT_LEFT_6;
//				tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft10.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_10, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_10, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_10;
					tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
			}else{
				selectLeft = 0;
				tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			
			break;
		case R.id.tvLeft6:
			if(selectLeft != SELECT_LEFT_6){
//				dataSelectLeft = (String)tvLeft6.getTag();
//				selectLeft = SELECT_LEFT_6;
//				tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectLeft = true;
				
				dataSelectLeft = (String)tvLeft6.getTag();
				if(isSelectRight){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(SELECT_LEFT_6, selectRight);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(SELECT_LEFT_6, selectRight);
					}
				}else{
					selectLeft = SELECT_LEFT_6;
					tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectLeft = true;
				}
			}else{
				selectLeft = 0;
				tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectLeft = false;
			}
			
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			
			break;
		case R.id.tvRight1:
			if(selectRight != SELECT_RIGHT_1){
				dataSelectRight = (String)tvRight1.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_1);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_1);
					}
				}else{
					selectRight = SELECT_RIGHT_1;
					tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
			}else{
				dataSelectRight = "";
				selectRight = 0;
				tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
//			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvRight2:
			if(selectRight != SELECT_RIGHT_2){
				
				dataSelectRight = (String)tvRight2.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_2);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_2);
					}
				}else{
					selectRight = SELECT_RIGHT_2;
					tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
//				dataSelectRight = (String)tvRight2.getTag();
//				selectRight = SELECT_RIGHT_2;
//				tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
			}else{
				
				selectRight = 0;
				tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvRight3:
			if(selectRight != SELECT_RIGHT_3){
				
				dataSelectRight = (String)tvRight3.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_3);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_3);
					}
				}else{
					selectRight = SELECT_RIGHT_3;
					tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
//				dataSelectRight = (String)tvRight3.getTag();
//				selectRight = SELECT_RIGHT_3;
//				tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
			}else{
				selectRight = 0;
				tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvRight4:
			if(selectRight != SELECT_RIGHT_4){
//				dataSelectRight = (String)tvRight4.getTag();
//				selectRight = SELECT_RIGHT_4;
//				tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight4.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_4);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_4);
					}
				}else{
					selectRight = SELECT_RIGHT_4;
					tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvRight5:
			if(selectRight != SELECT_RIGHT_5){
				
				dataSelectRight = (String)tvRight5.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_5);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_5);
					}
				}else{
					selectRight = SELECT_RIGHT_5;
					tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
//				dataSelectRight = (String)tvRight5.getTag();
//				selectRight = SELECT_RIGHT_5;
//				tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
			}else{
				selectRight = 0;
				tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
//			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			break;
		case R.id.tvRight7:
			if(selectRight != SELECT_RIGHT_7){
//				dataSelectRight = (String)tvRight6.getTag();
//				selectRight = SELECT_RIGHT_6;
//				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight7.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_7);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_7);
					}
				}else{
					selectRight = SELECT_RIGHT_7;
					tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			
			break;
		case R.id.tvRight8:
			if(selectRight != SELECT_RIGHT_8){
//				dataSelectRight = (String)tvRight6.getTag();
//				selectRight = SELECT_RIGHT_6;
//				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight8.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_8);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_8);
					}
				}else{
					selectRight = SELECT_RIGHT_8;
					tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			
			break;
		case R.id.tvRight9:
			if(selectRight != SELECT_RIGHT_9){
//				dataSelectRight = (String)tvRight6.getTag();
//				selectRight = SELECT_RIGHT_6;
//				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight9.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_9);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_9);
					}
				}else{
					selectRight = SELECT_RIGHT_9;
					tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			
			break;
		case R.id.tvRight10:
			if(selectRight != SELECT_RIGHT_10){
//				dataSelectRight = (String)tvRight6.getTag();
//				selectRight = SELECT_RIGHT_6;
//				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight10.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_10);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_10);
					}
				}else{
					selectRight = SELECT_RIGHT_10;
					tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			
			break;
		case R.id.tvRight6:
			if(selectRight != SELECT_RIGHT_6){
//				dataSelectRight = (String)tvRight6.getTag();
//				selectRight = SELECT_RIGHT_6;
//				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
//				isSelectRight = true;
				
				dataSelectRight = (String)tvRight6.getTag();
				if(isSelectLeft){
					if(dataSelectLeft.equals(dataSelectRight)){
						animCorrect(selectLeft, SELECT_RIGHT_6);
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
							countAnwserCorrect = countAnwserCorrect + 1;
						}
						countTrue = countTrue + 1;
						checkCountTrue(countTrue);
					}else{
						if(countCheckScreen < countTrue){
							countCheckScreen = countCheckScreen + 1;
						}
						animIn_Correct(selectLeft, SELECT_RIGHT_6);
					}
				}else{
					selectRight = SELECT_RIGHT_6;
					tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
					isSelectRight = true;
				}
				
			}else{
				selectRight = 0;
				tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
				isSelectRight = false;
			}
			
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			
			
			break;
			
		case R.id.ivHelp:
			
			break;
		default:
			break;
		}
	}
	
	private void animCorrect(int numLeft, int numRight){
		if(numLeft == SELECT_LEFT_1){
			tvLeft1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft1.startAnimation(animation1);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation1, tvLeft1, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation1, tvLeft1, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation1, tvLeft1, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation1, tvLeft1, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation1, tvLeft1, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation1, tvLeft1, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation1, tvLeft1, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation1, tvLeft1, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation1, tvLeft1, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation1, tvLeft1, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_2) {
			tvLeft2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft2.startAnimation(animation2);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation2, tvLeft2, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation2, tvLeft2, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation2, tvLeft2, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation2, tvLeft2, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation2, tvLeft2, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation2, tvLeft2, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation2, tvLeft2, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation2, tvLeft2, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation2, tvLeft2, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation2, tvLeft2, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_3) {
			tvLeft3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft3.startAnimation(animation3);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation3, tvLeft3, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation3, tvLeft3, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation3, tvLeft3, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation3, tvLeft3, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation3, tvLeft3, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation3, tvLeft3, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation3, tvLeft3, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation3, tvLeft3, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation3, tvLeft3, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation3, tvLeft3, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_4) {
			tvLeft4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft4.startAnimation(animation4);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation4, tvLeft4, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation4, tvLeft4, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation1, tvLeft4, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation4, tvLeft4, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation4, tvLeft4, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation4, tvLeft4, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation4, tvLeft4, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation4, tvLeft4, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation4, tvLeft4, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation4, tvLeft4, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_5) {
			tvLeft5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft5.startAnimation(animation5);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation1, tvLeft5, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation5, tvLeft5, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation5, tvLeft5, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation5, tvLeft5, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation5, tvLeft5, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation5, tvLeft5, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation5, tvLeft5, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation5, tvLeft5, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation5, tvLeft5, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation5, tvLeft5, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_6) {
			tvLeft6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft6.startAnimation(animation6);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation6, tvLeft6, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation6, tvLeft6, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation6, tvLeft6, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation6, tvLeft6, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation6, tvLeft6, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation6, tvLeft6, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation6, tvLeft6, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation6, tvLeft6, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation6, tvLeft6, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation6, tvLeft6, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_7) {
			tvLeft7.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft7.startAnimation(animation7);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation7, tvLeft7, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation7, tvLeft7, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation7, tvLeft7, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation7, tvLeft7, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation7, tvLeft7, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation7, tvLeft7, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation7, tvLeft7, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation7, tvLeft7, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation7, tvLeft7, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation7, tvLeft7, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_8) {
			tvLeft8.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft8.startAnimation(animation8);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation8, tvLeft8, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation8, tvLeft8, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation8, tvLeft8, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation8, tvLeft8, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation8, tvLeft8, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation8, tvLeft8, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation8, tvLeft8, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation8, tvLeft8, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation8, tvLeft8, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation8, tvLeft8, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_9) {
			tvLeft9.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft9.startAnimation(animation9);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation9, tvLeft9, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation9, tvLeft9, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation9, tvLeft9, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation9, tvLeft9, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation9, tvLeft9, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation9, tvLeft9, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation9, tvLeft9, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation9, tvLeft9, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation9, tvLeft9, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation9, tvLeft9, tvRight10);
			}
		}else if (numLeft == SELECT_LEFT_10) {
			tvLeft10.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvLeft10.startAnimation(animation10);
			if(numRight == SELECT_RIGHT_1){
				finishAnimCorrect(animation10, tvLeft10, tvRight1);
			}else if (numRight == SELECT_RIGHT_2) {
				finishAnimCorrect(animation10, tvLeft10, tvRight2);
			}else if (numRight == SELECT_RIGHT_3) {
				finishAnimCorrect(animation10, tvLeft10, tvRight3);
			}else if (numRight == SELECT_RIGHT_4) {
				finishAnimCorrect(animation10, tvLeft10, tvRight4);
			}else if (numRight == SELECT_RIGHT_5) {
				finishAnimCorrect(animation10, tvLeft10, tvRight5);
			}else if (numRight == SELECT_RIGHT_6) {
				finishAnimCorrect(animation10, tvLeft10, tvRight6);
			}else if (numRight == SELECT_RIGHT_7) {
				finishAnimCorrect(animation10, tvLeft10, tvRight7);
			}else if (numRight == SELECT_RIGHT_8) {
				finishAnimCorrect(animation10, tvLeft10, tvRight8);
			}else if (numRight == SELECT_RIGHT_9) {
				finishAnimCorrect(animation10, tvLeft10, tvRight9);
			}else if (numRight == SELECT_RIGHT_10) {
				finishAnimCorrect(animation10, tvLeft10, tvRight10);
			}
		}
		
		if(numRight == SELECT_RIGHT_1){
			tvRight1.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight1.startAnimation(animation11);
		}else if (numRight == SELECT_RIGHT_2) {
			tvRight2.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight2.startAnimation(animation12);
		}else if (numRight == SELECT_RIGHT_3) {
			tvRight3.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight3.startAnimation(animation13);
		}else if (numRight == SELECT_RIGHT_4) {
			tvRight4.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight4.startAnimation(animation14);
		}else if (numRight == SELECT_RIGHT_5) {
			tvRight5.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight5.startAnimation(animation15);
		}else if (numRight == SELECT_RIGHT_6) {
			tvRight6.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight6.startAnimation(animation16);
		}else if (numRight == SELECT_RIGHT_7) {
			tvRight7.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight7.startAnimation(animation17);
		}else if (numRight == SELECT_RIGHT_8) {
			tvRight8.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight8.startAnimation(animation18);
		}else if (numRight == SELECT_RIGHT_9) {
			tvRight9.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight9.startAnimation(animation19);
		}else if (numRight == SELECT_RIGHT_10) {
			tvRight10.setBackgroundResource(R.drawable.stroke_img_topic_selected);
			tvRight10.startAnimation(animation20);
		}
	}
	
	
	private void animIn_Correct(int numLeft, int numRight){
		if(numLeft == SELECT_LEFT_1){
			tvLeft1.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft1.startAnimation(animation1);
			finishAnimInCorrect(animation1, tvLeft1);
		}else if (numLeft == SELECT_LEFT_2) {
			tvLeft2.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft2.startAnimation(animation2);
			finishAnimInCorrect(animation2, tvLeft2);
		}else if (numLeft == SELECT_LEFT_3) {
			tvLeft3.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft3.startAnimation(animation3);
			finishAnimInCorrect(animation3, tvLeft3);
		}else if (numLeft == SELECT_LEFT_4) {
			tvLeft4.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft4.startAnimation(animation4);
			finishAnimInCorrect(animation4, tvLeft4);
		}else if (numLeft == SELECT_LEFT_5) {
			tvLeft5.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft5.startAnimation(animation5);
			finishAnimInCorrect(animation5, tvLeft5);
		}else if (numLeft == SELECT_LEFT_6) {
			tvLeft6.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft6.startAnimation(animation6);
			finishAnimInCorrect(animation6, tvLeft6);
		}else if (numLeft == SELECT_LEFT_7) {
			tvLeft7.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft7.startAnimation(animation7);
			finishAnimInCorrect(animation7, tvLeft7);
		}else if (numLeft == SELECT_LEFT_8) {
			tvLeft8.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft8.startAnimation(animation8);
			finishAnimInCorrect(animation8, tvLeft8);
		}else if (numLeft == SELECT_LEFT_9) {
			tvLeft9.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft9.startAnimation(animation9);
			finishAnimInCorrect(animation9, tvLeft9);
		}else if (numLeft == SELECT_LEFT_10) {
			tvLeft10.setBackgroundResource(R.color.chon_tu_sai);
			tvLeft10.startAnimation(animation10);
			finishAnimInCorrect(animation10, tvLeft10);
		}
		
		if(numRight == SELECT_RIGHT_1){
			tvRight1.setBackgroundResource(R.color.chon_tu_sai);
			tvRight1.startAnimation(animation11);
			finishAnimInCorrect(animation11, tvRight1);
		}else if (numRight == SELECT_RIGHT_2) {
			tvRight2.setBackgroundResource(R.color.chon_tu_sai);
			tvRight2.startAnimation(animation12);
			finishAnimInCorrect(animation12, tvRight2);
		}else if (numRight == SELECT_RIGHT_3) {
			tvRight3.setBackgroundResource(R.color.chon_tu_sai);
			tvRight3.startAnimation(animation13);
			finishAnimInCorrect(animation13, tvRight3);
		}else if (numRight == SELECT_RIGHT_4) {
			tvRight4.setBackgroundResource(R.color.chon_tu_sai);
			tvRight4.startAnimation(animation14);
			finishAnimInCorrect(animation14, tvRight4);
		}else if (numRight == SELECT_RIGHT_5) {
			tvRight5.setBackgroundResource(R.color.chon_tu_sai);
			tvRight5.startAnimation(animation15);
			finishAnimInCorrect(animation15, tvRight5);
		}else if (numRight == SELECT_RIGHT_6) {
			tvRight6.setBackgroundResource(R.color.chon_tu_sai);
			tvRight6.startAnimation(animation16);
			finishAnimInCorrect(animation16, tvRight6);
		}else if (numRight == SELECT_RIGHT_7) {
			tvRight7.setBackgroundResource(R.color.chon_tu_sai);
			tvRight7.startAnimation(animation17);
			finishAnimInCorrect(animation17, tvRight7);
		}else if (numRight == SELECT_RIGHT_8) {
			tvRight8.setBackgroundResource(R.color.chon_tu_sai);
			tvRight8.startAnimation(animation18);
			finishAnimInCorrect(animation18, tvRight8);
		}else if (numRight == SELECT_RIGHT_9) {
			tvRight9.setBackgroundResource(R.color.chon_tu_sai);
			tvRight9.startAnimation(animation19);
			finishAnimInCorrect(animation19, tvRight9);
		}else if (numRight == SELECT_RIGHT_10) {
			tvRight10.setBackgroundResource(R.color.chon_tu_sai);
			tvRight10.startAnimation(animation20);
			finishAnimInCorrect(animation20, tvRight10);
		}
	}
	
	private void finishAnimInCorrect(Animation animation, final TextView tv){
		animation.setAnimationListener(new AnimationListener() {
			
			@Override
			public void onAnimationStart(Animation arg0) {
				
			}
			
			@Override
			public void onAnimationRepeat(Animation arg0) {
				
			}
			
			@Override
			public void onAnimationEnd(Animation arg0) {
				selectLeft = 0;
				selectRight = 0;
				dataSelectLeft = "";
				dataSelectRight = "";
				isSelectLeft = false;
				isSelectRight = false;
				tv.setBackgroundResource(R.drawable.stroke_img_topic_tim_hinh_anh);
			}
		});
	}
	
	private void finishAnimCorrect(Animation animation, final TextView tvLeft, final TextView tvRight){
		animation.setAnimationListener(new AnimationListener() {
			@Override
			public void onAnimationStart(Animation arg0) {
				
			}
			@Override
			public void onAnimationRepeat(Animation arg0) {
				
			}
			@Override
			public void onAnimationEnd(Animation arg0) {
				selectLeft = 0;
				selectRight = 0;
				dataSelectLeft = "";
				dataSelectRight = "";
				isSelectLeft = false;
				isSelectRight = false;
				
				tvLeft.setVisibility(View.GONE);
				tvRight.setVisibility(View.GONE);
			}
		});
	}
	private void checkCountTrue(int count){
		Log.d(TAG, "Count true::" + count + "::size::" + mGameEntities.size());
		if(countTrue >= mGameEntities.size()){
			finishGame();
			HistoryEntity historyEntity = new HistoryEntity(1, thumbTopic, slugGameName, countAnwserCorrect, mGameEntities.size(), (int) System.currentTimeMillis(), slugTopicName, slugSubTopicName);
			mHistoryDAO.saveHistory(historyEntity);
		}else{
		}
	}
	private void checkSizeData(){
		if(mGameEntities.size() >= 1){
			tvLeft2.setVisibility(View.GONE);
			tvLeft3.setVisibility(View.GONE);
			tvLeft4.setVisibility(View.GONE);
			tvLeft5.setVisibility(View.GONE);
			tvLeft6.setVisibility(View.GONE);
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight2.setVisibility(View.GONE);
			tvRight3.setVisibility(View.GONE);
			tvRight4.setVisibility(View.GONE);
			tvRight5.setVisibility(View.GONE);
			tvRight6.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = null;
			gameEntity3 = null;
			gameEntity4 = null;
			gameEntity5 = null;
			gameEntity6 = null;
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
			
		}else if(mGameEntities.size() >= 2){
			tvLeft3.setVisibility(View.GONE);
			tvLeft4.setVisibility(View.GONE);
			tvLeft5.setVisibility(View.GONE);
			tvLeft6.setVisibility(View.GONE);
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight3.setVisibility(View.GONE);
			tvRight4.setVisibility(View.GONE);
			tvRight5.setVisibility(View.GONE);
			tvRight6.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = null;
			gameEntity4 = null;
			gameEntity5 = null;
			gameEntity6 = null;
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 3){
			tvLeft4.setVisibility(View.GONE);
			tvLeft5.setVisibility(View.GONE);
			tvLeft6.setVisibility(View.GONE);
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight4.setVisibility(View.GONE);
			tvRight5.setVisibility(View.GONE);
			tvRight6.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = null;
			gameEntity5 = null;
			gameEntity6 = null;
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 4){
			tvLeft5.setVisibility(View.GONE);
			tvLeft6.setVisibility(View.GONE);
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight5.setVisibility(View.GONE);
			tvRight6.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = null;
			gameEntity6 = null;
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 5){
			tvLeft6.setVisibility(View.GONE);
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight6.setVisibility(View.GONE);
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = null;
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 6){
			tvLeft7.setVisibility(View.GONE);
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight7.setVisibility(View.GONE);
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = null;
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 7){
			tvLeft8.setVisibility(View.GONE);
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight8.setVisibility(View.GONE);
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = null;
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 8){
			tvLeft9.setVisibility(View.GONE);
			tvLeft10.setVisibility(View.GONE);
			
			tvRight9.setVisibility(View.GONE);
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = mGameEntities.get(7);
			gameEntity9 = null;
			gameEntity10 = null;
		}else if(mGameEntities.size() >= 9){
			tvLeft10.setVisibility(View.GONE);
			
			tvRight10.setVisibility(View.GONE);
			
			gameEntity1 = mGameEntities.get(0); 
			gameEntity2 = mGameEntities.get(1);
			gameEntity3 = mGameEntities.get(2);
			gameEntity4 = mGameEntities.get(3);
			gameEntity5 = mGameEntities.get(4);
			gameEntity6 = mGameEntities.get(5);
			gameEntity7 = mGameEntities.get(6);
			gameEntity8 = mGameEntities.get(7);
			gameEntity9 = mGameEntities.get(8);
			gameEntity10 = null;
		}
	}
	 
}
